<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('布控信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>车牌号码：</label>
                                <input type="text" name="carNum"/>
                                <input name="isShi" text="是否跨市布控" type="hidden" value="N">
                            </li>
                            <li>
                                <label>号牌种类：</label>
                                <select name="carNumType" th:with="type=${@dict.getType('car_num_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>布控单号：</label>
                                <input type="text" name="controlNum"/>
                            </li>
                            <li>
                                <label>布控类型：</label>
                                <select name="controlType" th:with="type=${@dict.getType('control_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>有效期止：</label>
                                <input type="text" class="time-input" placeholder="请选择有效期止" name="validUntil"/>
                            </li>
                            <li>
                                <label>有效期始：</label>
                                <input type="text" class="time-input" placeholder="请选择有效期开始" name="validStart"/>
                            </li>
                            <li>
                                <label>有效状态：</label>
                                <select name="isState" th:with="type=${@dict.getType('sys_yes_no')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>审核状态：</label>
                                <select name="shenState" th:with="type=${@dict.getType('shen_state')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>发布时间：</label>
                                <input type="text" class="time-input" placeholder="请选择发布时间" name="controlDate"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>


            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('control:control:edit')}]];
        var removeFlag = [[${@permission.hasPermi('control:control:remove')}]];
        var carNumTypeDatas = [[${@dict.getType('car_num_type')}]];
        var controlTypeDatas = [[${@dict.getType('control_type')}]];
        var isStateDatas = [[${@dict.getType('sys_yes_no')}]];
        var isShiDatas = [[${@dict.getType('sys_yes_no')}]];
        var shenStateDatas = [[${@dict.getType('shen_state')}]];
        var prefix = ctx + "control/control";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "布控信息",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'controlId',
                    title: '菜单ID',
                    visible: false
                },
                {
                    field: 'carNum',
                    title: '车牌号码'
                },
                {
                    field: 'carNumType',
                    title: '号牌种类',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(carNumTypeDatas, value);
                    }
                },
                {
                    field: 'controlNum',
                    title: '布控单号'
                },
                {
                    field: 'controlType',
                    title: '布控类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(controlTypeDatas, value);
                    }
                },
                {
                    field: 'validUntil',
                    title: '有效期止'
                },
                {
                    field: 'validStart',
                    title: '有效期开始'
                },
                {
                    field: 'controlOwner',
                    title: '布控人'
                },
                {
                    field: 'controlOrg',
                    title: '布控单位'
                },
                {
                    field: 'tels',
                    title: '移动电话',
                    visible: false
                },
                {
                    field: 'remark',
                    title: '案情简介',
                    visible: false
                },
                {
                    field: 'isState',
                    title: '有效状态',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(isStateDatas, value);
                    }
                },
                {
                    field: 'shenState',
                    title: '审核状态',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(shenStateDatas, value);
                    }
                },
                {
                    field: 'controlDate',
                    title: '发布时间'
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>